home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Hyper / A-An / Address Master.cpt / AddressMaster / AddressMaster / card_3045.txt < prev    next >
Encoding:
Text File  |  1988-02-27  |  17.1 KB  |  671 lines

  1. -- card: 3045 from stack: in
  2. -- bmap block id: 2361
  3. -- flags: 0000
  4. -- background id: 2747
  5. -- name: Front
  6. ----- HyperTalk script -----
  7. on openCard
  8.  
  9.   set the lockText of bkgnd field "Name" to true
  10.   set the lockText of bkgnd field "Home Address" to true
  11.   set the lockText of bkgnd field "Home Phone" to true
  12.   set the lockText of bkgnd field "Business Address" to true
  13.   set the lockText of bkgnd field "Business Phone" to true
  14.   set the lockText of bkgnd field "Comments" to true
  15.   set the lockText of bkgnd field "Family" to true
  16.   set the lockText of bkgnd field "Keyword" to true
  17.  
  18. end openCard
  19.  
  20. ------------------------------------------------------------------------
  21.  
  22. on closeCard
  23.  
  24.   set the lockText of bkgnd field "Name" to false
  25.   set the lockText of bkgnd field "Home Address" to false
  26.   set the lockText of bkgnd field "Home Phone" to false
  27.   set the lockText of bkgnd field "Business Address" to false
  28.   set the lockText of bkgnd field "Business Phone" to false
  29.   set the lockText of bkgnd field "Comments" to false
  30.   set the lockText of bkgnd field "Family" to false
  31.   set the lockText of bkgnd field "Keyword" to false
  32.  
  33. end closeCard
  34.  
  35. ------------------------------------------------------------------------
  36.  
  37.  
  38. -- part 9 (button)
  39. -- low flags: 80
  40. -- high flags: A002
  41. -- rect: left=193 top=263 right=285 bottom=293
  42. -- title width / last selected line: 0
  43. -- icon id / first selected line: 0 / 0
  44. -- text alignment: 1
  45. -- font id: 0
  46. -- text size: 12
  47. -- style flags: 0
  48. -- line height: 16
  49. -- part name: Quit Find
  50. ----- HyperTalk script -----
  51. on mouseUp
  52.   global connect
  53.   hide card button "hiliter1"
  54.   hide card button "Quit Find"
  55.   hide card field "Mainkeyword"
  56.   hide card field "FoundName"
  57.   ZoomRect the rect of card field "Mainkeyword", the rect of bkgnd button "Find"
  58.   put 0 into connec
  59.   put "" into card field "FoundName"
  60. end mouseUp
  61.  
  62.  
  63.  
  64. -- part 28 (button)
  65. -- low flags: 00
  66. -- high flags: A000
  67. -- rect: left=18 top=180 right=225 bottom=56
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 20186 / 20186
  70. -- text alignment: 1
  71. -- font id: 0
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: Sort
  76. ----- HyperTalk script -----
  77. on mouseUp
  78.   global connect
  79.   answer "Sort this stack according to :" with "Keyword" or "First Name" or "Last Name"
  80.  
  81.   if it is "First Name" then
  82.     sort by first word of first line of field "Name"
  83.     exit mouseUp
  84.   end if
  85.  
  86.   if it = "Last Name" then
  87.     sort by last word of first line of field "name"
  88.     exit mouseUp
  89.   end if
  90.  
  91.   if it is "Keyword" then
  92.     put 1 into connect
  93.     ZoomRect the rect of card button "Sort", the rect of card field "Mainkeyword"
  94.     show card field "Mainkeyword"
  95.     show card button "Quit Sort"
  96.     exit mouseUp
  97.   end if
  98.  
  99. end mouseUp
  100.  
  101.  
  102.  
  103. -- part 33 (button)
  104. -- low flags: 00
  105. -- high flags: A000
  106. -- rect: left=6 top=124 right=170 bottom=70
  107. -- title width / last selected line: 0
  108. -- icon id / first selected line: 3191 / 3191
  109. -- text alignment: 1
  110. -- font id: 0
  111. -- text size: 12
  112. -- style flags: 0
  113. -- line height: 16
  114. -- part name: Add Keyword
  115. ----- HyperTalk script -----
  116. on mouseUp
  117.   ask "Enter the new keyword, please :"
  118.   if it = "" then
  119.     exit mouseUp
  120.   else
  121.  
  122.     --      ****  Convert to CAPITAL letters  ****
  123.  
  124.     set the cursor to 4
  125.     set the lockScreen to true
  126.     put it into temp
  127.     repeat with x = 1 to the length of temp
  128.       put the charToNum of char x of temp into hold
  129.       if hold ‚â• 97 and hold ‚â§ 122 then
  130.         put hold - 32 into hold
  131.         put the numToChar of hold into char x of temp
  132.       end if
  133.     end repeat
  134.  
  135.     put the number of lines in card field "Mainkeyword" into lineCount
  136.     add 1 to lineCount
  137.     put temp & "," into line lineCount of card field "Mainkeyword"
  138.  
  139.   end if
  140.  
  141.   put SortItems (card field "Mainkeyword", true) into card field "Mainkeyword"
  142.  
  143.   repeat with i = 1 to the number of cards
  144.     put card field "Mainkeyword" of card "front" into bkgnd field "area-of-int" of card i
  145.   end repeat
  146.  
  147.   hide card field "Mainkeyword"
  148.   set the lockScreen to false
  149.  
  150. end mouseUp
  151.  
  152.  
  153. -- part 34 (button)
  154. -- low flags: 00
  155. -- high flags: A000
  156. -- rect: left=0 top=296 right=342 bottom=77
  157. -- title width / last selected line: 0
  158. -- icon id / first selected line: 12384 / 12384
  159. -- text alignment: 1
  160. -- font id: 0
  161. -- text size: 12
  162. -- style flags: 0
  163. -- line height: 16
  164. -- part name: Delete Keyword
  165. ----- HyperTalk script -----
  166. on mouseUp
  167.   global connect
  168.   ZoomRect the rect of card button "Delete Keyword", the rect of card field "Mainkeyword"
  169.   show card field "Mainkeyword"
  170.   show card button "Quit Delete"
  171.   put 3 into connect
  172. end mouseUp
  173.  
  174.  
  175.  
  176. -- part 37 (button)
  177. -- low flags: 80
  178. -- high flags: 8002
  179. -- rect: left=172 top=244 right=266 bottom=340
  180. -- title width / last selected line: 0
  181. -- icon id / first selected line: 0 / 0
  182. -- text alignment: 1
  183. -- font id: 0
  184. -- text size: 12
  185. -- style flags: 0
  186. -- line height: 16
  187. -- part name: Hide areas of interest
  188. ----- HyperTalk script -----
  189. on mouseUp
  190.   hide card button "hiliter3"
  191.   hide card button "Hide areas of interest"
  192.   hide card field "area-of-int2"
  193.   ZoomRect the rect of card field "area-of-int2", the rect of bkgnd button "Find"
  194. end mouseUp
  195.  
  196.  
  197.  
  198. -- part 48 (field)
  199. -- low flags: 81
  200. -- high flags: 2007
  201. -- rect: left=101 top=93 right=285 bottom=406
  202. -- title width / last selected line: 0
  203. -- icon id / first selected line: 0 / 0
  204. -- text alignment: 0
  205. -- font id: 3
  206. -- text size: 9
  207. -- style flags: 16384
  208. -- line height: 12
  209. -- part name: Intro
  210.  
  211.  
  212. -- part 49 (field)
  213. -- low flags: 01
  214. -- high flags: 2004
  215. -- rect: left=137 top=36 right=71 bottom=359
  216. -- title width / last selected line: 0
  217. -- icon id / first selected line: 0 / 0
  218. -- text alignment: 0
  219. -- font id: 7
  220. -- text size: 18
  221. -- style flags: 256
  222. -- line height: 24
  223. -- part name: 
  224.  
  225.  
  226. -- part 50 (button)
  227. -- low flags: 00
  228. -- high flags: A003
  229. -- rect: left=200 top=74 right=115 bottom=291
  230. -- title width / last selected line: 0
  231. -- icon id / first selected line: 0 / 0
  232. -- text alignment: 1
  233. -- font id: 0
  234. -- text size: 12
  235. -- style flags: 0
  236. -- line height: 16
  237. -- part name: Introduction
  238. ----- HyperTalk script -----
  239. on mouseUp
  240.  
  241.   hide card button "Introduction"
  242.   ZoomRect the rect of card button "Introduction", the rect of card field "Intro"
  243.   show card field "Intro"
  244.   show card button "Close Introduction"
  245.  
  246. end mouseUp
  247.  
  248.  
  249.  
  250. -- part 51 (button)
  251. -- low flags: 80
  252. -- high flags: A002
  253. -- rect: left=101 top=284 right=306 bottom=406
  254. -- title width / last selected line: 0
  255. -- icon id / first selected line: 0 / 0
  256. -- text alignment: 1
  257. -- font id: 0
  258. -- text size: 12
  259. -- style flags: 0
  260. -- line height: 16
  261. -- part name: Close Introduction
  262. ----- HyperTalk script -----
  263. on mouseUp
  264.   Hide card button "Close Introduction"
  265.   Hide card field "Intro"
  266.   ZoomRect the rect of card field "Intro", the rect of card button "Introduction"
  267.   show card button "Introduction"
  268.   choose browse tool
  269.   get loc of card field "Display"
  270.   show card field "Display"
  271.   click at it
  272.   type "Address Master" & return & "is ready to go !" & return
  273.   put "" into card field "Display"
  274.   hide card field "Display"
  275. end mouseUp
  276.  
  277.  
  278.  
  279. -- part 52 (field)
  280. -- low flags: 80
  281. -- high flags: 0000
  282. -- rect: left=147 top=124 right=210 bottom=345
  283. -- title width / last selected line: 0
  284. -- icon id / first selected line: 0 / 0
  285. -- text alignment: 0
  286. -- font id: 7
  287. -- text size: 18
  288. -- style flags: 20736
  289. -- line height: 28
  290. -- part name: Display
  291.  
  292.  
  293. -- part 55 (field)
  294. -- low flags: 81
  295. -- high flags: 2007
  296. -- rect: left=108 top=129 right=264 bottom=379
  297. -- title width / last selected line: 0
  298. -- icon id / first selected line: 0 / 0
  299. -- text alignment: 0
  300. -- font id: 3
  301. -- text size: 12
  302. -- style flags: 0
  303. -- line height: 16
  304. -- part name: Mainkeyword
  305. ----- HyperTalk script -----
  306. on mouseUp
  307.  
  308.   global connect
  309.  
  310.   ------------- compute line number of the mouseclick
  311.   get item 2 of the clickloc - item 2 of the rect of me + scroll of me
  312.   put 1 + it div the textHeight of me into lineNum
  313.  
  314.   ------------- highlight line, use magic button
  315.   set hilite of card button "hiliter1" to false
  316.   get item 2 of rect of me + lineNum * textHeight of me - scroll of me
  317.   put 1 + it - textHeight of me div 2 into v
  318.   show card button "hiliter1" at item 1 of loc of card button "hiliter1",v -- this lights up the button
  319.   set hilite of card button "hiliter1" to true -- make button black
  320.  
  321.   ------------- put data selected into sort field
  322.   put line lineNum of card field "Mainkeyword" into name1
  323.  
  324.   -----------------------------------------------------------------------
  325.  
  326.   if connect = 3 then
  327.     hide card button "hiliter1"
  328.     hide card button "Quit Delete"
  329.     hide card field "Mainkeyword"
  330.     ZoomRect the rect of card field "Mainkeyword", the rect of card button "Delete Keyword"
  331.  
  332.     set the lockScreen to true
  333.     set the cursor to 4
  334.     put "" into line lineNum of card field "Mainkeyword"
  335.     put SortItems (card field "Mainkeyword",true) into card field "Mainkeyword"
  336.     put 0 into connect
  337.     set the lockScreen to false
  338.     exit mouseUp
  339.   end if
  340.  
  341.   if connect = 2 then
  342.     hide card button "hiliter1"
  343.     hide card button "Quit Find"
  344.     hide card field "Mainkeyword"
  345.     ZoomRect the rect of card field "Mainkeyword", the rect of bkgnd button "Find"
  346.     set the lockScreen to true
  347.     set the cursor to 4
  348.     put 1 into lineNum
  349.  
  350.     repeat number of cards times
  351.       if name1 is in bkgnd field "Keyword" then
  352.         put first line of bkgnd field "Name" into line lineNum of card field "FoundName" of card "front"
  353.         add 1 to lineNum
  354.         go next
  355.       else
  356.         go next
  357.       end if
  358.     end repeat
  359.  
  360.     set the lockScreen to false
  361.     ZoomRect the rect of bkgnd button "Find", the rect of card field "FoundName"
  362.     show card field "FoundName"
  363.     show card button "Quit Find"
  364.     exit mouseUp
  365.   end if
  366.  
  367.  
  368.   if connect = 1 then
  369.     hide card button "hiliter1"
  370.     hide card button "Quit Sort"
  371.     hide card field "Mainkeyword"
  372.     ZoomRect the rect of card field "Mainkeyword", the rect of card button "Sort"
  373.  
  374.     set the lockScreen to true
  375.     set the cursor to 4
  376.     go first
  377.  
  378.     repeat number of cards times
  379.       put "~" into first line of bkgnd field "sorted"
  380.       go next
  381.     end repeat
  382.  
  383.     put 1 into count
  384.     go first
  385.  
  386.     repeat the number of cards times
  387.       find name1 in bkgnd field "Keyword" of card count
  388.       if the result is empty then
  389.         put name1 into first line of bkgnd field "sorted"
  390.         add 1 to count
  391.         go next
  392.       else
  393.         add 1 to count
  394.         go next
  395.       end if
  396.     end repeat
  397.  
  398.     go card "front"
  399.     put "           " into bkgnd field "sorted"
  400.     go first
  401.     sort by bkgnd field "sorted"
  402.     put 0 into connect
  403.     set the lockScreen to false
  404.     exit mouseUp
  405.   end if
  406.  
  407. end mouseUp
  408.  
  409.  
  410.  
  411. -- part 57 (button)
  412. -- low flags: 80
  413. -- high flags: A002
  414. -- rect: left=193 top=263 right=285 bottom=293
  415. -- title width / last selected line: 0
  416. -- icon id / first selected line: 0 / 0
  417. -- text alignment: 1
  418. -- font id: 0
  419. -- text size: 12
  420. -- style flags: 0
  421. -- line height: 16
  422. -- part name: Quit Sort
  423. ----- HyperTalk script -----
  424. on mouseUp
  425.   global connect
  426.   hide card button "Quit Sort"
  427.   hide card button "hiliter1"
  428.   hide card field "Mainkeyword"
  429.   ZoomRect the rect of card field "Mainkeyword", the rect of card button "Sort"
  430.   put 0 into connect
  431. end mouseUp
  432.  
  433.  
  434.  
  435. -- part 58 (button)
  436. -- low flags: 80
  437. -- high flags: A002
  438. -- rect: left=193 top=263 right=285 bottom=293
  439. -- title width / last selected line: 0
  440. -- icon id / first selected line: 0 / 0
  441. -- text alignment: 1
  442. -- font id: 0
  443. -- text size: 12
  444. -- style flags: 0
  445. -- line height: 16
  446. -- part name: Quit Delete
  447. ----- HyperTalk script -----
  448. on mouseUp
  449.   global connect
  450.   hide card button "Quit Delete"
  451.   hide card button "hiliter1"
  452.   hide card field "Mainkeyword"
  453.   ZoomRect the rect of card field "Mainkeyword", the rect of card button "Delete Keyword"
  454.   put 0 into connect
  455. end mouseUp
  456.  
  457.  
  458.  
  459. -- part 66 (field)
  460. -- low flags: 81
  461. -- high flags: 2007
  462. -- rect: left=108 top=129 right=264 bottom=379
  463. -- title width / last selected line: 0
  464. -- icon id / first selected line: 0 / 0
  465. -- text alignment: 0
  466. -- font id: 3
  467. -- text size: 12
  468. -- style flags: 0
  469. -- line height: 16
  470. -- part name: FoundName
  471. ----- HyperTalk script -----
  472. on mouseUp
  473.  
  474.   global connect
  475.  
  476.   -- compute line number of the mouseclick
  477.   get item 2 of the clickloc - item 2 of the rect of me + scroll of me
  478.   put 1 + it div the textHeight of me into lineNum
  479.  
  480.   -- highlight line, use magic button
  481.   set hilite of card button "hiliter1" to false
  482.   get item 2 of rect of me + lineNum * textHeight of me - scroll of me
  483.   put 1 + it - textHeight of me div 2 into v
  484.   show card button "hiliter1" at item 1 of loc of card button "hiliter1",v -- this lights up the button
  485.   set hilite of card button "hiliter1" to true -- make button black
  486.  
  487.   -- put data selected into sort field
  488.   put line lineNum of card field "FoundName" into name1
  489.  
  490.   if connect = 2 then
  491.     hide card button "hiliter1"
  492.     hide card button "Quit"
  493.     hide card button "Quit Find"
  494.     hide card field "FoundName"
  495.     ZoomRect the rect of card field "FoundName", the rect of bkgnd button "Find"
  496.     put "" into card field "FoundName"
  497.     put 0 into connect
  498.   end if
  499.  
  500.   find name1 in field "name"
  501.  
  502. end mouseUp
  503.  
  504.  
  505. -- part 67 (button)
  506. -- low flags: 80
  507. -- high flags: A002
  508. -- rect: left=193 top=263 right=285 bottom=293
  509. -- title width / last selected line: 0
  510. -- icon id / first selected line: 0 / 0
  511. -- text alignment: 1
  512. -- font id: 0
  513. -- text size: 12
  514. -- style flags: 0
  515. -- line height: 16
  516. -- part name: Quit
  517. ----- HyperTalk script -----
  518. on mouseUp
  519.   global connect
  520.   hide card button "Quit"
  521.   hide card field "FoundName"
  522.   ZoomRect the rect of card field "FoundName", the rect of bkgnd button "Find"
  523.   put 0 into connec
  524.   put "" into card field "FoundName"
  525. end mouseUp
  526.  
  527.  
  528.  
  529. -- part 25 (button)
  530. -- low flags: 80
  531. -- high flags: 4000
  532. -- rect: left=109 top=161 right=180 bottom=362
  533. -- title width / last selected line: 0
  534. -- icon id / first selected line: 0 / 0
  535. -- text alignment: 1
  536. -- font id: 0
  537. -- text size: 12
  538. -- style flags: 0
  539. -- line height: 16
  540. -- part name: hiliter1
  541.  
  542.  
  543. -- part contents for background part 2
  544. ----- text -----
  545. 2/27/88
  546.  
  547. -- part contents for background part 47
  548. ----- text -----
  549. BASEBALL TEAM,
  550. CHOIR,
  551. EMPLOYEE,
  552. FRIEND,
  553. RELATIVE,
  554. STUDENT,
  555. XMAS,
  556.  
  557.  
  558. -- part contents for background part 52
  559. ----- text -----
  560. Date established
  561. Age of card
  562.  
  563. -- part contents for background part 51
  564. ----- text -----
  565. Tue, Feb 23, 1988
  566.  
  567. -- part contents for background part 53
  568. ----- text -----
  569.  
  570.     Business
  571.     Adress
  572.  
  573. -- part contents for background part 54
  574. ----- text -----
  575.  
  576.      Home
  577.     Adress
  578.  
  579. -- part contents for background part 58
  580. ----- text -----
  581. Name
  582.  
  583. -- part contents for background part 56
  584. ----- text -----
  585. Family
  586.  
  587. -- part contents for background part 60
  588. ----- text -----
  589. Home Phone
  590.  
  591. -- part contents for background part 62
  592. ----- text -----
  593. Business Phone
  594.  
  595. -- part contents for background part 64
  596. ----- text -----
  597. Areas
  598.  
  599. -- part contents for card part 48
  600. ----- text -----
  601.   Address Master goes beyond the functionality of the "rolodex" type of stack due to its powerful find and sort buttons.   You can find people by their first and/or last name,  the first letter of their first or last name,  or by their "keywords".  You attach keywords (ie: friend, relative,  Christmas card,  employee,  student, job, etc.) to each person's card.  Sorting can be done by first name,  last name,  or keyword.
  602.  
  603.   When a find or sort is to be done by keyword,   a scrolling field displays the complete list of 
  604. keywords you've put in the stack.  Just click once on the keyword of choice and Address Master will return a scrolling list of all the people who posess that keyword.  Then click on the person you want and Address Master does the rest.
  605.  
  606.   Buttons are included to totally automate the process of adding and deleting both cards and       keywords.
  607.  
  608.   Each card has both a large scrolling field for comments relating to that person and a field displaying the date the card was created and the age of the card (in days).  To move from an address card to the front card,  just click the 
  609. "Address Master" button.
  610.  
  611.   I would like to thank the following people:
  612.  
  613.      Marvin G. Nelson for his XFCN "SortItems".
  614.  
  615.      Richard P. Davis for his XCMD "ZoomRect".
  616.  
  617.      Steve Drazga for his functions "noFieldDelete"
  618.      and "noButtonDelete"
  619.  
  620.      Joe LaBenne for his ideas and inspiration.
  621.  
  622.      Gordon Williams for his patience.
  623.  
  624.      Bill Atkinson for his inspired program.
  625.  
  626.  
  627.   This stack is not to be sold under any conditions.  Please feel free to distribute it to friends, post it on bulletin board systems,  and so forth.  Please do NOT post this stack or ZoomRect itself on CI$ (Compuserve).
  628.  
  629.   If you enjoy this freeware stack,  please show it by creating a stack or script and passing it on to a friend.
  630.  
  631.   All necessary fonts, icons, XFCNs, and XCMDs are included in the stack.  No bugs have been found to date.  However,  as with all freeware and shareware,  use it at your own risk and backup your data.  Hope you enjoy Address Master and find it useful.
  632.  
  633.  
  634. **********************************
  635.  
  636.                      Bud Meyaard
  637.                      11603 S. 39 St.
  638.                      Omaha, NE 68123
  639.  
  640. **********************************
  641.  
  642.  
  643.  
  644.  
  645. -- part contents for card part 49
  646. ----- text -----
  647.   ADDRESS  MASTER
  648.  
  649. -- part contents for background part 69
  650. ----- text -----
  651. 12:12 PM
  652.  
  653. -- part contents for background part 41
  654. ----- text -----
  655.  
  656.  
  657.  
  658. -- part contents for card part 55
  659. ----- text -----
  660. BASEBALL TEAM,
  661. CHOIR,
  662. EMPLOYEE,
  663. FRIEND,
  664. RELATIVE,
  665. STUDENT,
  666. XMAS,
  667.  
  668.  
  669. -- part contents for background part 46
  670. ----- text -----
  671.